Stored Procedures [dbo].[BAEOrderProductGetAllChildrenCount]
Properties
PropertyValue
ANSI Nulls OnYes
Quoted Identifier OnYes
Parameters
NameData TypeMax Length (Bytes)
@OrderProductIDint4
SQL Script
create procedure [dbo].[BAEOrderProductGetAllChildrenCount] @OrderProductID as
int
AS
    SELECT COUNT(OrderSuperProductChildProduct.OrderSuperProductChildProductID) AS Count
    FROM OrderProduct JOIN OrderSuperProductChildProduct ON OrderSuperProductChildProduct.OrderProductID = OrderProduct.OrderProductID
    WHERE OrderProduct.OrderProductID = @OrderProductID

GO
Uses